goog.provide('lfpug.ui.component.ContentUI');

goog.require('goog.dom.classes');
goog.require('goog.ui.Component');



/**
 * @constructor
 * @param {lfpug.Application} app
 *        Takes the application as a param.
 * @extends {goog.ui.Component}
 */
lfpug.ui.component.ContentUI = function(app) {
  this.application_ = app;
  goog.base(this);
};
goog.inherits(lfpug.ui.component.ContentUI, goog.ui.Component);


/**
 * Custom Css Class
 * @type {string}
 */
lfpug.ui.component.ContentUI.CSS_CLASS =
    goog.getCssName('lfpug-content');


/**
 * Get the Custom CSS Class.
 * @return {string}
 *         Returns css class name.
 */
lfpug.ui.component.ContentUI.prototype.getCssClass = function() {
  return lfpug.ui.component.ContentUI.CSS_CLASS;
};


/**
 * @override
 */
lfpug.ui.component.ContentUI.canDecorate = function(element) {
  return true;
};


/**
 * Adds a class name to the generated element.
 *  @override
 */
lfpug.ui.component.ContentUI.prototype.decorateInternal = function(element) {
  goog.base(this, 'decorateInternal', element);
  this.element_ = element;
  goog.dom.classes.add(element, this.getCssClass());
};
